<!--<!DOCTYPE html>-->
<!--<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">-->

<!--<head>-->
<!--    <title>Login</title>-->
<!--    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css">-->
<!--</head>-->

<!--<body>-->
<!--<div class="container">-->
<!--    <div class="row">-->
<!--        <div class="col-md-6 offset-md-3">-->
<!--            <h1 class="text-center mb-3">Login</h1>-->
<!--            <form th:action="@{/login}" method="post">-->
<!--                <div class="form-group">-->
<!--                    <label for="username">Username</label>-->
<!--                    <input type="text" class="form-control" id="username"-->
<!--                           name="username" required th:value="${username}">-->
<!--                </div>-->
<!--                <div class="form-group">-->
<!--                    <label for="password">Password</label>-->
<!--                    <input type="password" class="form-control" id="password"-->
<!--                           name="password" required th:value="${password}">-->
<!--                </div>-->
<!--                <div class="form-group">-->
<!--                    <p th:text="${error}" class="alert alert-danger"-->
<!--                       th:if="${error}">Invalid username or password</p>-->
<!--                </div>-->
<!--                <button type="submit" class="btn btn-primary">Login</button>-->
<!--            </form>-->
<!--            <div class="mt-3 text-center">-->
<!--                <a th:href="@{/register}">Don't have an account? Register here.</a>-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
<!--</div>-->
<!--</body>-->

<!--</html>-->

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head>
    <title>Login</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css">
</head>

<body>
<div class="container">
    <div class="row">
        <div class="col-md-6 offset-md-3">
            <h1 class="text-center mb-3">Login</h1>
            <form th:action="@{/login}" method="post">
                <div class="form-group">
                    <label for="username">Username</label>
                    <input type="text" class="form-control" id="username"
                           name="username" required th:value="${username}" />
                </div>
                <div class="form-group">
                    <label for="password">Password</label>
                    <input type="password" class="form-control" id="password"
                           name="password" required th:value="${password}" />
                </div>
                <div class="form-group" th:if="${error}">
                    <p class="alert alert-danger" th:text="${error}">Invalid username or password</p>
                </div>
                <button type="submit" class="btn btn-primary">Login</button>
            </form>
            <div class="mt-3 text-center">
                <a th:href="@{/register}">Don't have an account? Register here.</a>
            </div>
        </div>
    </div>
</div>
</body>

</html>